import { Tabs } from 'antd-mobile'
import './index.css'
import { useTabs } from './Tabs'
import HomeList from './HomeList'
const Home = () => {
  const { channels } = useTabs()
  return (
    <>
      <div className="tabContainer">
        <Tabs defaultActiveKey={'0'}>
          {channels.map((item) => (
            <Tabs.Tab title={item.name} key={item.id}>
              {/* 加类名，严格控制滚动盒子 */}
              <div className='containerBxo'>
              <HomeList channelId={''+item.id} />
              </div>
            </Tabs.Tab>
          ))}
        </Tabs>
      </div>
    </>
  )
}
export default Home